package com.zhousb.deviceManager.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhousb.deviceManager.common.PageRequest;
import com.zhousb.deviceManager.common.R;
import com.zhousb.deviceManager.common.ResponseResult;
import com.zhousb.deviceManager.model.so.OrderSO;
import com.zhousb.deviceManager.service.OrderOutService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * @author ZhouShenBin
 * @date 2024/6/27 19:34
 * @description
 */
@RestController
@RequestMapping("/order/out")
public class OrderOutController {
    @Resource
    private OrderOutService orderOutService;

    @PostMapping("/page")
    public ResponseResult page(@RequestBody PageRequest<OrderSO> so){
        return R.success(orderOutService.page(new Page<>(so.getCurrent(),so.getSize()),so.getQuery()));
    }
}
